'
' @Date: 2022-11-24 08:40:18
' @LastEditors: ����
' @gitee: https://gitee.com/chun22222222
' @github: https://github.com/chun222
' @Desc: 
' @LastEditTime: 2022-12-12 11:31:56
' @FilePath: \zebra_webapi\tools\test.vbs
'
'
Function HttpRequest(name)
    Dim url,paramsStr
    url = "http://192.168.3.130:9022/print"
    paramsStr = "{""name"":""" + name + """,""data"":{"
    paramsStr = paramsStr + """" + "title" + """:""" + "ssss" + ""","
    paramsStr = Left(paramsStr, Len(paramsStr) - 1) + "}}"
 
    Dim oauth_http
    Set oauth_http=CreateObject("Microsoft.XMLHttp")
    oauth_http.Open "POST",url,False 
    oauth_http.setRequestHeader "Content-Type","application/json"
   
    oauth_http.Send(paramsStr)
    HttpRequest = oauth_http.responseText
    Set oauth_http=nothing 
End Function
    
 
 
 
 MsgBox(HttpRequest("test"))
 